<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>

	<body>
	</body>
	<script type="text/javascript">
		function getMime(dist) {
			return new Promise(function(resolve, reject) {
				var xhr = new XMLHttpRequest();
				xhr.open('GET', dist);
				xhr.responseType = 'blob';
				xhr.onreadystatechange = function() {
					if(xhr.readyState == 4) {
						if((xhr.status >= 200 && xhr.status < 300) || xhr.status == 304) {
							resolve(xhr.response.type);
						} else {
							reject();
						}
					}
				}
				xhr.send();
			})
		}
		getMime().then(function(type) {
			console.log(type)
		}, function() {
			console.log('rejct')
		});
	</script>

</html>